package org.jet.emall.prod.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-30 13:55
 */
@Data
public class OrderDTO {
    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "订单ID,采用雪花算法的64位整数")
    private Long id;

    @ApiModelProperty(value = "订单编号: 生成规则 1位订单类型+17位时间戳+14位(用户ID加密&随机数)")
    private String code;

    @ApiModelProperty(value = "会员ID")
    private Long customerId;

    @ApiModelProperty(value = "收货人姓名")
    private String shippingUser;

    @ApiModelProperty(value = "收货人电话")
    private String shippingPhone;

    @ApiModelProperty(value = "收货人所在省")
    private String province;

    @ApiModelProperty(value = "收货人所在城市")
    private String city;

    @ApiModelProperty(value = "收货人所在区/县")
    private String district;

    @ApiModelProperty(value = "收货人所在具体的地址门牌号")
    private String address;

    @ApiModelProperty(value = "支付方式: 1 现金, 2 余额, 3 网银, 4 支付宝, 5 微信")
    private Byte paymentType;

    @ApiModelProperty(value = "订单金额")
    private Long orderMoney;

    @ApiModelProperty(value = "优惠金额")
    private Long reductionMoney;

    @ApiModelProperty(value = "运费金额")
    private Integer shippingMoney;

    @ApiModelProperty(value = "实际支付金额")
    private Long paymentMoney;

    @ApiModelProperty(value = "快递公司名称")
    private String shippingCompName;

    @ApiModelProperty(value = "快递单号")
    private String shippingSn;

    @ApiModelProperty(value = "下单时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "发货时间")
    private LocalDateTime shippingTime;

    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;

    @ApiModelProperty(value = "收货时间")
    private LocalDateTime receiveTime;

    @ApiModelProperty(value = "订单状态: 0 已提交订单,未支付; 1 支付成功,已确认; 正在配货(2 打印，3 出库，4 扫描，5 打包),6 已发货(正在运送途中),待收货; 7 收货并确认,已完成; 8 取消(待审核);9 成功取消(审核通过); 10 取消失败(审核未通过)")
    private Byte status;

    @ApiModelProperty(value = "订单积分")
    private Integer orderPoint;

    @ApiModelProperty(value = "发票抬头")
    private String invoiceTime;

    @ApiModelProperty(value = "最后修改时间")
    private LocalDateTime modifiedTime;

    private List<OrderItemDetailViewDTO> items;

}
